package com.video.video.service.impl;

import com.video.common.utils.uuid.IdUtils;
import com.video.video.domain.RegisterSettings;
import com.video.video.mapper.RegisterSettingsMapper;
import com.video.video.service.IRegisterSettingsService;
import java.util.List;
import com.video.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * APP注册设置Service业务层处理
 *
 * @author ruoyi
 * @date 2023-03-20
 */
@Service
public class RegisterSettingsServiceImpl implements IRegisterSettingsService
{
    @Autowired
    private RegisterSettingsMapper registerSettingsMapper;

    /**
     * 查询APP注册设置
     *
     * @param id APP注册设置主键
     * @return APP注册设置
     */
    @Override
    public RegisterSettings selectRegisterSettingsById(String id)
    {
        return registerSettingsMapper.selectRegisterSettingsById(id);
    }

    /**
     * 查询APP注册设置列表
     *
     * @param registerSettings APP注册设置
     * @return APP注册设置
     */
    @Override
    public List<RegisterSettings> selectRegisterSettingsList(RegisterSettings registerSettings)
    {
        return registerSettingsMapper.selectRegisterSettingsList(registerSettings);
    }

    /**
     * 新增APP注册设置
     *
     * @param registerSettings APP注册设置
     * @return 结果
     */
    @Override
    public int insertRegisterSettings(RegisterSettings registerSettings)
    {
        registerSettings.setId(IdUtils.getId());
        registerSettings.setCreateTime(DateUtils.getNowDate());
        return registerSettingsMapper.insertRegisterSettings(registerSettings);
    }

    /**
     * 修改APP注册设置
     *
     * @param registerSettings APP注册设置
     * @return 结果
     */
    @Override
    public int updateRegisterSettings(RegisterSettings registerSettings)
    {
        registerSettings.setUpdateTime(DateUtils.getNowDate());
        return registerSettingsMapper.updateRegisterSettings(registerSettings);
    }

    /**
     * 批量删除APP注册设置
     *
     * @param ids 需要删除的APP注册设置主键
     * @return 结果
     */
    @Override
    public int deleteRegisterSettingsByIds(String[] ids)
    {
        return registerSettingsMapper.deleteRegisterSettingsByIds(ids);
    }

    /**
     * 删除APP注册设置信息
     *
     * @param id APP注册设置主键
     * @return 结果
     */
    @Override
    public int deleteRegisterSettingsById(String id)
    {
        return registerSettingsMapper.deleteRegisterSettingsById(id);
    }
}
